﻿using System;

namespace MissCat2011
{
    class MissCat2011
    {
        static void Main()
        {
            int n = int.Parse(Console.ReadLine());
            int[] cats = new int[n];

            for (int i = 0; i < n; i++)
            {
                cats[i] = int.Parse(Console.ReadLine());
            }

            int smallest = cats[0];

            for (int i = 0; i < n; i++)
            {
                if (cats[i] < smallest)
                {
                    smallest = cats[i];
                }
                else if (cats[i] == smallest)
                {
                    smallest = cats[i];
                }
            }
            Console.WriteLine(smallest);
        }
    }
}
